<div class="content_filtro">
    <?php if($this->per_add){?>
    <div class="content-btn">
        <span>Novo</span><a href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit', 'id' => '')); ?>">+</a>
    </div>
    <?php } ?>
</div>


<div class="content-list">
    
    <h2><?php echo $this->titulo;?></h2>
    
    <table id="tlist">
        <thead>
            <tr>
                <th>Código</th>
                <th>Nome</th>
                <th>Status</th>
                <th class="bc">&nbsp;</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($this->result as $row) { 
            ?>
                <tr>
            <td><?php echo $row['DMT_ID']; ?></td>
                    <td><?php echo $row['DMT_NOM']; ?></td>
                    <td><?php echo tools::returnStatus($row['DMT_STA']); ?></td>
                    <td class="bc">
                        <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => 'galeria', 'action' => 'index','modulo' => $this->controller, 'ctl_id' => $row['DMT_ID'])); ?>">Galeria</a><?php }?>
                        <?php if($this->per_edt){?><a class="btn-pdr" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit', 'id' => $row['DMT_ID'])); ?>">Editar</a><?php }?>
                        <?php if($this->per_del && $row['DMT_STA'] == 0){?><a class="btn-pdr" href="javascript:void(0);" onclick="list_delete('<?php echo $this->controller; ?>', <?php echo $row['DMT_ID'] ?>, $(this));">Deletar</a><?php } ?>
                    </td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>